VCS Player and Pedestrians
=Player and Pedestrians= Because of the fact that Vic is a pedestrian, pedestrians and Vic have everything in common around the pplayer area, only his data there is edited through the controls. There are a few things (such as what pedestrian Vic is aiming at and more) that are discussed on this page that dwell outside of the pplayer area. pplayer -pplayer is a variable declared by the Cheat Device that holds the address to Vic's representing pedestrian object in memory. Likewise, each pedestrian has its own object in memory that represents them - their weapons, health, location, decisions, speed, etc. - everything that makes the pedestrian, well, a pedestrian. pped -pped is a general term that was made to represent pedestrians in memory. pped is defined by the cheat writer, and if you look at pretty much any cheat that involves a pedestrian being manipulated, pped is used. pped usually holds the memory address of a pedestrian, and can then be used just like pplayer would. For example, if you wanted to get the pedestrian that Vic is aiming at you would do... Which could then be used to manipulate the pedestrian. These two terms will be used to represent Vic (the player) and any pedestrian that might be being manipulated. ---- =The Breakdown= pplayer or pped + 0x0 float First off, right at pplayer or pped are 3 floats. These represent the right hand vectors of the X, Y, and Z rotations of our pedestrian. pplayer or pped + 0x10 float Next are another 3 floats that represent the three forward vectors of X, Y, and Z rotation. pplayer or pped + 0x20 float And last but not least are another 3 floats that represent up vectors of X, Y, and Z rotation. More will be added here later on... pplayer or pped + 0x30 float +0x30 is by far one of the most commonly used addresses in all cheats. The reason being because it represents the X, Y, and Z location of your pedestrian. Example: This would set the player's coordinates in game to 0, 0, 0 (X, Y, Z), moving Vic somewhere under Leaf Links. This would not work if the player was in a car. pplayer or pped + 0x4C char/boolean Changes to 0x2 when ped is touching something, 0x0 otherwise. pplayer or pped + 0x56 short Most objects in VCS have an ID which is a short at 0x56. This tells the game which model and collision model will be used as well as what voices to use and more. We can use this to identify if the given object is a pedestrian. It is highly reccomended that you do not mess with this, otherwise the game might crash! You can check it, but do not modify it! pplayer or pped + 0x70 float Rotational speed is basically a measure of how fast the pedestrian or other object is spinning. Just like the rotation and location addresses, these go in the order of X, Y, and Z. To rotate a pedestrian in the cardinal directions, you would edit +0x78, the Z axis, because the Z axis manipulates the X and Y axi. Example: This would, as the cheat's name says, slowly make Vic turn around in place. pplayer or pped + 0x80 float Seems to display where ped is being touched relative to his position. Has X, Y, and Z but you rarely will see the Z have a non-zero value. pplayer or pped + 0xF0 int pointer This pointer points to the object being stood on by the pedestrian. This could be a car, a road, a building, or anything. Example: This would instantly remove the object that Vic is standing on by: getint(pplayer + 0xF0) getting the address of what the player is standing on... + 0x38 adding 0x38 to it to access its Z location... , -10000.0 and setting this value to -10,000.0, leaving the object 10,000 meters below Vice City! pplayer or pped + 0xF4 int pointer Points to the last object that ped touched. pplayer or pped + 0x137 char Changes depending on what terrain you are standing on. Example: pplayer or pped + 0x140 float Directional speed is how fast the pedestrian or other object is going on the X, Y, and Z axi. As with the others, this goes in X, Y, Z order. Note that negative and positive values effect which direction you will be going in. Example: Would cause Vic to fly straight up into the air until his Z speed caught back up with him, causing him to fall back to earth! pplayer or pped + 0x150 int pointer This pointer points to the object that the pedestrian is touching, whether it be a car, another pedestrian, or an object. Example: Would cause the first object that Vic touches to be placed 10,000 meters below Vice City. pplayer or pped + 0x190 char/boolean Non-zero if the ped is on land, 0 otherwise. pplayer or pped + 0x1C4 float Represents the acceleration of a ped falling down to earth. Begins at 0 until it slowly reaches 11.0, which it then stays constant until the ped lands. pplayer or pped + 0x1C8 short If set to 0x1020 the ped is unmounted from the ground, meaning you can use directional speed to move it away from the ground. If you attempt to use directional speed to move it without this short being set correctly it will not leave the ground. pplayer or pped + 0x1C9 char Divide by 0x10 and the value below will show if the ped is on the ground, in the air, or landing/rolling after falling. pplayer or pped + 0x1D8 char Divide by 0x10 and the value below will show whether or not the ped is falling into water. pplayer or pped + 0x1DB char Divide by 0x10 and value below will show whether or not the ped is in water. pplayer or pped + 0x420 float Gives the distance between the ped and the car it is entering in X, Y, Z order. pplayer or pped + 0x440 float Gives the X, Y, Z coordinates of the car being entered. pplayer or pped + 0x450 int pointer This is a pointer to what I like to call the ped's current "focus." This can be the car the ped is getting into, another ped the ped is aiming at, and many other things. pplayer or pped + 0x480 int pointer This is a pointer the the vehicle the ped is in, and can be used just like pcar. pplayer or pped + 0x484 int pointer This pointer shows the vehicle that the ped is entering. This must be used in order to make the pedestrian get into a vehicle using the AI commands later in this section. pplayer or pped + 0x4E4 float These two floats represent the amount of health and armor the pedestrian has, in that order. If the pedestrian's health reaches 0, regardless of the amount of armor it has, it will die. Examples: pplayer or pped + slot char Refer to table below for slot offsets and weapon IDs. This is the char that represents which weapon is in that slot. pplayer or pped + slot + 0x04 char Set to the following values depending on what the weapon is doing. pplayer or pped + slot + 0x08 int This is the amount of ammo in the ped's current clip. pplayer or pped + slot + 0x0C int This is the amount of ammo the ped has for the given weapon. Each slot is 0x1C bytes in length. Example: pplayer or pped + 0x6F8 int pointer Pointer to the ped that is closest to the player and the first ped that will be aimed at when the player hits R. pplayer or pped + 0x81C int pointer This is a pointer to a) the ped the ped is aiming at or b) where Vic is aiming if he is in manual aim mode. Points to 0x09914520 if in manual aim. paim = getint(pplayer + 0x81C); paim + 0x30 float This is the X, Y, and Z information as to where Vic is aiming if he is in manual aim mode, otherwise it is the location of the ped he is aiming at. This could be used to make a cheat that locks onto things. pplayer or pped + 0x890 int pointer This is a pointer to what I like to call the "Action Target," which is basically the pedestrian's focus. It points to another pedestrian to be used with the AI/Commands in the next section. If you set this to pplayer, then whatever the ped is doing will be focused towards Vic. pplayer or pped + 0x894 char This address is still very untested - there are many different things you can do with it, including forcing people in and out of your car, causing people to instantly drop dead, causing people to attack or follow you, etc. The limits are endless, as long as you know what you are doing. Most of these do work with Vic, but not all. Known values and their effects: pplayer or pped + 0x8B4 char This controls the animation of the pedestrian, making them do different things like drop dead, wave, fall over, etc. pplayer or pped + 0x8C4 char Displays the following values depending on what the ped is doing. pplayer or pped + 0xC80 float Displays the location in X, Y, Z order of the ped's target. ---- =Player-Only Addresses= 0x08BA1D70 int pointer This is a pointer to which pedestrian the player is targeting. From VCS Cracked Open Category:VCS Guide